#!/usr/bin/env python
import os

class BuildError(Exception):
    def __init__(self,file_,line,message,parent=None):
        msg="\n\nERROR:"
        msg+="\n   > File: "+file_
        msg+="\n   > Line: "+str(line)
        msg+="\n   > Message: "+message
        if parent:
            msg+="\n   > Parent: "+parent
        msg+="\n"
        Exception.__init__(self, msg)